#ifndef _SUNSHINE_LOGGER_
#define _SUNSHINE_LOGGER_

#include <string>
using std::string;

#include "log4cplus/loggingmacros.h"
#include "log4cplus/configurator.h"

#define LOGTRACE(logger, log) LOG4CPLUS_TRACE(logger.logger, log)
#define LOGDEBUG(logger, log) LOG4CPLUS_DEBUG(logger.logger, log)
#define LOGINFO(logger, log) LOG4CPLUS_INFO(logger.logger, log)
#define LOGWARN(logger, log) LOG4CPLUS_WARN(logger.logger, log)
#define LOGERROR(logger, log) LOG4CPLUS_ERROR(logger.logger, log)
#define LOGFATAL(logger, log) LOG4CPLUS_FATAL(logger.logger, log)

namespace SUNSHINE
{
	class Logger
	{
		public:
			log4cplus::Logger logger;

			Logger(const string & logName)
			{ 
				this->logger = log4cplus::Logger::getInstance(logName);
				log4cplus::PropertyConfigurator::doConfigure(("log.config"));
			}
	};
}






#endif //_SUNSHINE_LOGGER_

